﻿Imports System.Object
Imports VSModel
Imports Cls_Common
Partial Class FrontEnd_Control_Store_Contact
    Inherits System.Web.UI.UserControl
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            If Not Page.RouteData.Values("Id") Is Nothing Then
                'hidCateId.value = Page.RouteData.Values("CateId")
                BindToGrid(Page.RouteData.Values("Id"))
            End If

        End If
    End Sub

    Private Sub BindToGrid(ByVal StoreId As Integer)
        Using Data As New VSEntities
            Dim p = (From q In Data.Stores Where q.StoreId = StoreId Select q).FirstOrDefault
            If Not p Is Nothing Then

                Page.Title = p.Title
                'ltrDiaChi.Text = p.DiaChi
                'ltrEmail.Text = p.Email
                'ltrDienThoai.Text = p.Phone
                'If Not p.PhoneOther Is Nothing Then
                '    ltrDienThoai.Text = p.Phone & " - " & p.PhoneOther
                'End If
                ltrContactUs.Text = p.ContactUs

            End If
        End Using
    End Sub
End Class
